import iconList from "@/const/iconList";

export const tableOption = {
  editBtn: false,
  delBtn: false,
  printBtn: true,
  searchBtn: true,
  border: true,
  stripe: true,
  menuAlign: "center",
  align: "center",
  menuWidth: 200,
  column: [
    {
      label: 'ID',
      prop: 'attrId',
      addDisabled: true,
      addDisplay: false,
      editDisabled: true
    },
    {
      label: '属性名',
      type: 'input',
      prop: 'attrName'
    },
    {
      label: '可检索',
      type: 'switch',
      prop: 'searchType',
      value: 1,
      activeColor: '#25C45F',
      inactiveColor: '#FB4646',
      dicData: [{value: 0}, {value: 1}],
      slot: true
    },
    {
      label: '值类型',
      type: 'switch',
      prop: 'valueType',
      value: 1,
      activeColor: '#25C45F',
      inactiveColor: '#FB4646',
      dicData: [{value: 0, label: '只能单个值'}, {value: 1, label: '允许多个值'}],
      slot: true
    },
    {
      label: '图标',
      prop: 'icon',
      type: 'icon',
      iconList: iconList,
      slot: true
    },
    {
      label: '可选值',
      type: 'select',
      prop: 'valueSelect',
      width: 150,
      multiple: true,
      tags: true,
      allowCreate: true,
      filterable: true,
      defaultFirstOption: true,
      slot: true,
      formslot: true,
      value: [],
      dicData: []
    },
    {
      label: '启用',
      type: 'switch',
      prop: 'enable',
      value: 1,
      activeColor: '#25C45F',
      inactiveColor: '#FB4646',
      dicData: [{value: 0}, {value: 1}],
      slot: true
    },
    {
      label: '所属分类',
      prop: 'categoryName',
      editDisabled: true,
      editDisplay: false,
    },
    {
      label: '所属分类',
      type: 'tree',
      prop: 'catelogId',
      showColumn: false,
      dicData: [],
      value: '0'
    },
    {
      label: '所属分组',
      prop: 'groupName',
      editDisabled: true,
      editDisplay: false,
    },
    {
      label: '所属分组',
      type: 'select',
      prop: 'attrGroupId',
      showColumn: false,
      dicData: []
    },
    {
      label: '快速展示',
      type: 'switch',
      prop: 'showDesc',
      value: 1,
      activeColor: '#25C45F',
      inactiveColor: '#FB4646',
      dicData: [{value: 0}, {value: 1}],
      slot: true
    }
  ]
}

export const treeOption = {
  accordion: true,
  defaultExpandAll: false,
  formOption: {
    labelWidth: 100,
    column: [{
      label: '自定义项',
      prop: 'test'
    }],
  },
  props: {
    labelText: '标题',
    label: 'label',
    value: 'value',
    children: 'children'
  }
}

export const typeList = [
  "", "success", "info", "warning", "danger"
]
